/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model.beans;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author kelyane
 */

@Entity
@Table(name="CaracteristicasPaciente")
@NamedQueries({
    @NamedQuery(name="findAllCaracteristicasPaciente", query="from CaracteristicasPaciente")    
})

public class CaracteristicasPaciente implements Serializable{    
    
    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    private Long ID;
    
    @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn(name="CARAC_PACIENTE_ID",nullable=false )
    private Paciente paciente;
    
    @Column(name="FUMA", length=5, nullable=false)    
    private boolean fuma;
    
    @Column(name="BEBE", length=5, nullable=false)
    private boolean bebe;
    
    @Column(name="DIABETE", length=5, nullable=false)
    private boolean diabete;
    
    @Column(name="COLESTEROL", length=5, nullable=false)
    private boolean colesterol;
    
    @Column(name="DOENCA_CARDIACA", length=5, nullable=false)
    private boolean doencasCardiacas;
    
   /* @Column(name="CIRURGIAS", length=150, nullable=true)
    private List<String> cirurgias = new LinkedList<>();
    
    @Column(name="ALERGIAS", length=150, nullable=true)
    private List<String> alergias = new LinkedList<>();*/

    
    public CaracteristicasPaciente(){
        super();
    }
    
    public CaracteristicasPaciente(Paciente paciente, boolean fuma, boolean bebe, boolean diabete, boolean colesterol, boolean doencasCardiacas){
        this.paciente = paciente;
        this.bebe = bebe;
        this.fuma = fuma;
        this.diabete = diabete;
        this.colesterol = colesterol;
        this.doencasCardiacas = doencasCardiacas;
    }
    
 /*  public List<String> getCirurgias() {
        return cirurgias;
    }

    public List<String> getAlergias() {
        return alergias;
    }*/
    
    public boolean isFuma() {
        return fuma;
    }

    public void setFuma(boolean fuma) {
        this.fuma = fuma;
    }

    public boolean isBebe() {
        return bebe;
    }

    public void setBebe(boolean bebe) {
        this.bebe = bebe;
    }

    public boolean isDiabete() {
        return diabete;
    }

    public void setDiabete(boolean diabete) {
        this.diabete = diabete;
    }

    public boolean isColesterol() {
        return colesterol;
    }

    public void setColesterol(boolean colesterol) {
        this.colesterol = colesterol;
    }

    public boolean isDoencasCardiacas() {
        return doencasCardiacas;
    }

    public void setDoencasCardiacas(boolean doencasCardiacas) {
        this.doencasCardiacas = doencasCardiacas;
    }

  /*  public void setCirurgias(List<String> cirurgias) {
        this.cirurgias = cirurgias;
    }

    public void setAlergias(List<String> alergias) {
        this.alergias = alergias;
    }*/

    public Paciente getPaciente() {
        return paciente;
    }

    public void setPaciente(Paciente paciente) {
        this.paciente = paciente;
    }
    
    
        
}
